package com.yhb.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RapidCheat {
    private String id;
    private String userId;
    private Type type;
    private Status status;
    private String consumeCardId;
    private String consumeCardNumber;
    private String consumeCardBank;
    private Card.Type consumeCardType;

    private String remitCardId;
    private String remitCardNumber;
    private String remitCardBank;
    private Card.Type remitCardType;

    private BigDecimal amount;

    private BigDecimal commission;
    private BigDecimal remitFee;

    private String consumeFlowId;
    private String remitFlowId;

    private String failReason;

    private Date createTime;
    private Date consumeDoneTime;
    private Date remitTime;
    private Date remitDoneTime;
    private Date updateTime;


    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String verifyCode;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String province;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String city;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String district;

    //          |--> CONSUME_FAILED
    // CREATED ----> CONSUMED  ---> REMITTED
    //                          |-> REMIT_FAILED
    public enum Status {
        CREATED,
        CONSUMED,
        CONSUME_FAILED,
        REMITTED,
        REMIT_FAILED
    }

    public enum Type {
        ALL,
        COMMON_CHANNEL,
        UNION_PAY_CHANNEL,
    }



}
